export default {
    rules: {
        // 邮箱
        email: [
            {required: true, message: '请输入邮箱', trigger: 'blur'},
            {
                pattern: /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/,
                message: '请正确填写邮箱',
                trigger: 'blur'
            },
        ],
        // 用户名
        username: [
            {required: true, message: '请输入姓名', trigger: 'blur'}
        ],
        // 密码
        userpwd: [
            {required: true, message: '请输入密码', trigger: 'blur'},
            {
                pattern: /^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$)([^\u4e00-\u9fa5\s]){6,20}$/,
                message: '请输入6-20位英文字母、数字或者符号（除空格），且字母、数字和标点符号至少包含两种',
                trigger: 'blur'
            },
        ],
        // 二次密码
        userpwd2: [
            {required: true, message: '请输入密码', trigger: 'blur'},
            {
                pattern: /^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$)([^\u4e00-\u9fa5\s]){6,20}$/,
                message: '请输入6-20位英文字母、数字或者符号（除空格），且字母、数字和标点符号至少包含两种',
                trigger: 'blur'
            }
        ],
        // 身份证
        idcard: [
            {required: true, message: '请输入身份证', trigger: 'blur'},
            {
                pattern: /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
                message: '请正确填写身份证',
                trigger: 'blur'
            },
        ],
        // 所属班级
        class: [
            {required: true, message: '请选择班级', trigger: 'blur'}
        ],
        // 用户身份
        level: [
            {required: true, message: '请选择用户身份', trigger: 'blur'}
        ],
        // 成绩信息
        results:[
            {required: true, message: '请输入成绩', trigger: 'blur'}
        ],
        // 科目
        subjects:[
            {required: true, message: '请输入科目', trigger: 'blur'}
        ],
    }
}